home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 49
/
Volume 49 - JOGO DISK .iso
/
Games
/
feverfrenzy-demo.swf
/
scripts
/
DefineSprite_142
/
frame_1
/
DoAction.as
< prev
Wrap
Text File
|
2007-09-28
|
2KB
|
152 lines
function setIndex(id)
{
mIndex = id;
}
function getIndex()
{
return mIndex;
}
function setID(id)
{
mID = id;
}
function getID()
{
return mID;
}
function setInHand()
{
mbInHand = true;
}
function setNumber(n)
{
mMedNumber_mc.gotoAndStop(n);
miNumber = n;
}
function getNumber()
{
return miNumber;
}
function setTipo(t)
{
indice = t % 5 + 1;
gotoAndStop("meds" + indice);
miTipo = t;
}
function getTipo()
{
return miTipo;
}
function setLencol()
{
gotoAndStop("sheet");
mID = -2;
mMedNumber_mc._visible = false;
}
function setReceita(rec)
{
gotoAndStop("receipt");
mID = -3;
mReceita = rec;
mMedNumber_mc._visible = false;
}
function getReceita()
{
return mReceita;
}
function isVazia()
{
return mID == -1;
}
function isLencol()
{
return mID == -2;
}
function isReceita()
{
return mID == -3;
}
function isRemedio()
{
return mID == -4;
}
function setRemedio(receita)
{
mReceita = receita;
mID = -4;
setNumber(mReceita.bed);
setTipo(mReceita.tipo);
mMedNumber_mc._visible = true;
}
function pausa()
{
mbPaused = true;
}
function continua(elapsed)
{
mbPaused = false;
}
var mbInHand;
var miNumber;
var mID;
if(mID == undefined)
{
mID = -1;
}
var mIndex;
if(mIndex == undefined)
{
mIndex = -1;
}
var miTipo;
var mReceita;
if(mbInHand == undefined)
{
mbInHand = false;
}
mMouseMask_mc._visible = false;
var lastMouseIn = false;
this.onMouseMove = function()
{
if(mbPaused)
{
return undefined;
}
if(!mbInHand && this._visible)
{
var _loc3_ = {x:this._xmouse,y:this._ymouse};
this.localToGlobal(_loc3_);
if(mMouseMask_mc.hitTest(_loc3_.x,_loc3_.y,false))
{
if(!lastMouseIn)
{
lastMouseIn = true;
_root.cursor_mc.setOver2(this);
}
}
else if(lastMouseIn)
{
lastMouseIn = false;
_root.cursor_mc.setNotOver2(this);
}
}
};
this.onMouseDown = function()
{
if(mbPaused)
{
return undefined;
}
if(!mbInHand && this._visible)
{
var _loc4_ = {x:this._xmouse,y:this._ymouse};
this.localToGlobal(_loc4_);
if(mMouseMask_mc.hitTest(_loc4_.x,_loc4_.y,false))
{
_root.Sons.gotoAndStop("click");
_parent.moveToMedicine(mIndex);
}
}
};
var mbPaused = false;